<ion-content>
    <ion-list>
        <ng-container *ngFor="let group of subwikis">
            @if (group.label) {
                <ion-item-divider>
                    <ion-label>
                        <p class="item-heading">
                            <core-format-text [text]="group.label" contextLevel="course" [contextInstanceId]="courseId"
                                [wsNotFiltered]="true" />
                        </p>
                    </ion-label>
                </ion-item-divider>
            }
            <ion-item class="ion-text-wrap" *ngFor="let subwiki of group.subwikis" (click)="openSubwiki(subwiki)" button
                [attr.aria-current]="isSubwikiSelected(subwiki) ? 'page' : 'false'" [detail]="false">
                <ion-label>
                    <core-format-text [text]="subwiki.name" contextLevel="course" [contextInstanceId]="courseId" [wsNotFiltered]="true" />
                </ion-label>
                @if (isSubwikiSelected(subwiki)) {
                    <ion-icon name="fas-check" slot="end" aria-hidden="true" />
                }
            </ion-item>
        </ng-container>
    </ion-list>
</ion-content>
